<template>
  <div class="hello">
    <h1>博奥赛斯智慧医疗</h1>
    <h2>友情链接</h2>
    <ul>
      <li>
        <a
          href="https://192.168.1.11:8443/login"
          target="_blank"
        >
          web端入口
        </a>
      </li>
    </ul>
    <div class="chartContainer">
      <Bar class="chart"></Bar>
    </div>
  </div>
</template>

<script>
import Bar from './common/Bar'
export default {
  name: 'HelloWorld',
  components: {
    Bar
  },
  data () {
    return {
      msg: 'Welcome to Your Vue.js App'
    }
  },
  created () {
    webClient.callH5 = function(){
      console.log('调用H5的方法')
      window.alert('被调用')
    }
    // window.android.callAndroid("你好，Android! ")
    if(window.android!=null && typeof(window.android)!="undefined"){
      window.android.callAndroid("你好，Android! ")
    }else{
      console.log('android 对象不存在')
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
/* 图表样式 */
.chartContainer {
  width: 85%;
  height: 50%;
  margin: 2px auto;
  min-height: 300px;
  margin-bottom: 10px;
}

@media only screen and (max-width: 1281px) {
  .chartContainer {
    width: 95%;
    height: 50%;
  }
}
.chart {
  margin: 0px auto;
}
/* 图表样式结束 */
</style>
